//
//  UIView+LLZLayout.m
//  xxShare
//
//  Created by 柳麟喆 on 2018/3/6.
//  Copyright © 2018年 lzLiu. All rights reserved.
//

#import "UIView+LLZLayout.h"

@implementation UIView (LLZLayout)

- (CGFloat)llz_top{
    return self.frame.origin.y;
}

- (void)setLlz_top:(CGFloat)llz_top{
    CGRect frame = self.frame;
    frame.origin.y = llz_top;
    self.frame = frame;
}

- (CGFloat)llz_left{
    return self.frame.origin.x;
}

- (void)setLlz_left:(CGFloat)llz_left{
    CGRect frame = self.frame;
    frame.origin.x = llz_left;
    self.frame = frame;
}

- (CGFloat)llz_bottom{
    return self.frame.size.height + self.frame.origin.y;
}

- (void)setLlz_bottom:(CGFloat)llz_bottom{
    CGRect frame = self.frame;
    frame.origin.y = llz_bottom - self.frame.size.height;
    self.frame = frame;
}

- (CGFloat)llz_right{
    return self.frame.origin.x + self.frame.size.width;
}

- (void)setLlz_right:(CGFloat)llz_right{
    CGRect frame = self.frame;
    frame.origin.x = llz_right - self.frame.size.width;
    self.frame = frame;
}

- (CGFloat)llz_width{
    return  self.frame.size.width;
}

- (void)setLlz_width:(CGFloat)llz_width{
    CGRect frame = self.frame;
    frame.size.width = llz_width;
    self.frame = frame;
}

- (CGFloat)llz_height{
    return self.frame.size.height;
}

- (void)setLlz_height:(CGFloat)llz_height{
    CGRect frame = self.frame;
    frame.size.height = llz_height;
    self.frame = frame;
}

- (CGFloat)llz_centerX{
    return self.center.x;
}

- (void)setLlz_centerX:(CGFloat)llz_centerX{
    self.center = CGPointMake(llz_centerX, self.center.y);
}

- (CGFloat)llz_centerY{
    return self.center.y;
}

- (void)setLlz_centerY:(CGFloat)llz_centerY{
    self.center = CGPointMake(self.center.x, llz_centerY);
}

- (CGPoint)llz_origin{
    return self.frame.origin;
}

- (void)setLlz_origin:(CGPoint)llz_origin{
    CGRect frame = self.frame;
    frame.origin = llz_origin;
    self.frame = frame;
}

- (CGSize)llz_size{
    return self.frame.size;
}

- (void)setLlz_size:(CGSize)llz_size{
    CGRect frame = self.frame;
    frame.size = llz_size;
    self.frame = frame;
}


@end
